wayland: Only check top-most for grabbing popups
authorJonas Ådahl <jadahl@gmail.com>
Wed, 24 Apr 2019 11:33:12 +0000 (13:33 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 29 Apr 2019 16:00:53 +0000 (16:00 +0000)
Non-grabbing popups are not limited to a single
nesting stack, as per the spec, so we should not
prevent that on the client-side.

gdk/wayland/gdksurface-wayland.c

index 529af6f7920d8b06f4fbcf67cb5ff94406a66ca2..7af011b814fd534b404186c18fbdffe138526b8a 100644 (file)
@@ -2209,10 +2209,11 @@ gdk_wayland_surface_create_xdg_popup (GdkSurface     *surface,
       g_warning ("Can't map popup, already mapped");
       return;
     }
-  if ((display->current_popups &&
-       g_list_last (display->current_popups)->data != parent) ||
-      (!display->current_popups &&
-       !is_realized_toplevel (parent)))
+  if (grab_input_seat &&
+      ((display->current_popups &&
+        g_list_last (display->current_popups)->data != parent) ||
+       (!display->current_popups &&
+        !is_realized_toplevel (parent))))
     {
       g_warning ("Tried to map a popup with a non-top most parent");
       return;